package com.ruipengkj.factory;

import java.awt.MediaTracker;
import java.util.Hashtable;

import javax.swing.ImageIcon;

public class ImageFactory {
	private ImageFactory() {}
	/**图片保存的绝对包路径*/
	private static final String REAL_PATH = "com/ruipengkj/images/";
	/**窗体图像名称的常量*/
	
	/**工具栏图像名称的常量*/
	public static final String SAVE_EDIT = "save_edit.gif";

	/**功能ICON*/
	public static String FUN_ICON_SELECT = "fun_icon_select.png";
	public static String FUN_1_ICON_1 = "fun_1_icon_1.png";
	public static String FUN_1_ICON_1_1 = "fun_1_icon_1_1.png";
	public static String FUN_1_ICON_2_2 = "fun_1_icon_2_2.png";
	public static String FUN_1_ICON_3_3 = "fun_1_icon_3_3.png";
	public static String FUN_1_ICON_4_4 = "fun_1_icon_4_4.png";
	public static String FUN_1_ICON_5_5 = "fun_1_icon_5_5.png";
	public static String FUN_2_ICON_3 = "fun_2_icon_3.png";
	public static String FUN_2_ICON_1_1 = "fun_2_icon_1_1.png";
	public static String FUN_2_ICON_2_2 = "fun_2_icon_2_2.png";
	public static String FUN_2_ICON_3_3 = "fun_2_icon_3_3.png";
	public static String FUN_2_ICON_4_4 = "fun_2_icon_4_4.png";
	public static String FUN_3_ICON_3 = "fun_3_icon_3.png";
	public static String FUN_6_ICON_1_1 = "fun_6_icon_1_1.png";
	public static String FUN_6_ICON_2_2 = "fun_6_icon_2_2.png";
	public static String FUN_6_ICON_3_3 = "fun_6_icon_3_3.png";
	public static String FUN_6_ICON_4_4 = "fun_6_icon_4_4.png";
	public static String FUN_6_ICON_5_5 = "fun_6_icon_5_5.png";
	public static String FUN_1_ICON_2 = "fun_1_icon_2.png";
	public static String FUN_1_ICON_3 = "fun_1_icon_3.png";
	public static String FUN_1_ICON_4 = "fun_1_icon_4.png";
	public static String FUN_1_ICON_5 = "fun_1_icon_5.png";
	public static String FUN_3_ICON_1 = "fun_3_icon_1.png";
	public static String FUN_3_ICON_1_1 = "fun_3_icon_1_1.png";
	public static String FUN_3_ICON_2 = "fun_3_icon_2.png";
	public static String FUN_3_ICON_2_2 = "fun_3_icon_2_2.png";
	public static String FUN_3_ICON_3_3 = "fun_3_icon_3_3.png";
	public static String FUN_3_ICON_4_4 = "fun_3_icon_4_4.png";
	public static String FUN_3_ICON_4 = "fun_3_icon_4.png";
	public static String FUN_3_ICON_5_5 = "fun_3_icon_5_5.png";
	public static String FUN_4_ICON_1 = "fun_4_icon_1.png";
	public static String FUN_4_ICON_1_1 = "fun_4_icon_1_1.png";
	public static String FUN_4_ICON_2 = "fun_4_icon_2.png";
	public static String FUN_4_ICON_2_2 = "fun_4_icon_2_2.png";
	public static String FUN_5_ICON_1 = "fun_5_icon_1.png";
	public static String FUN_5_ICON_1_1 = "fun_5_icon_1_1.png";
	public static String FUN_5_ICON_2 = "fun_5_icon_2.png";
	public static String FUN_5_ICON_2_2 = "fun_5_icon_2_2.png";
	public static String FUN_5_ICON_3 = "fun_5_icon_3.png";
	public static String FUN_5_ICON_3_3 = "fun_5_icon_3_3.png";
	public static String FUN_5_ICON_4 = "fun_5_icon_4.png";
	public static String FUN_5_ICON_4_4 = "fun_5_icon_4_4.png";
	public static String FUN_5_ICON_5 = "fun_5_icon_5.png";
	public static String FUN_5_ICON_5_5 = "fun_5_icon_5_5.png";
	public static String FUN_5_ICON_6 = "fun_5_icon_6.png";
	public static String FUN_5_ICON_6_6 = "fun_5_icon_6_6.png";
	public static String FUN_7_ICON_1 = "fun_7_icon_1.png";
	public static String FUN_7_ICON_1_1 = "fun_7_icon_1_1.png";
	public static String FUN_7_ICON_2 = "fun_7_icon_2.png";
	public static String FUN_7_ICON_2_2 = "fun_7_icon_2_2.png";
	public static String FUN_7_ICON_3_3 = "fun_7_icon_3_3.png";
	public static String FUN_7_ICON_4 = "fun_7_icon_4.png";
	public static String FUN_7_ICON_4_4 = "fun_7_icon_4_4.png";
	public static String FUN_7_ICON_5_5 = "fun_7_icon_5_5.png";
	
	
	/**流程图片*/
	public static String PROCESS_1_BG = "process_1_bg.png";
	public static String PROCESS_1_1_BTN = "process_1_1_btn.png";
	public static String PROCESS_1_2_BTN = "process_1_2_btn.png";
	public static String PROCESS_1_3_BTN = "process_1_3_btn.png";
	public static String PROCESS_1_4_BTN = "process_1_4_btn.png";
	public static String PROCESS_1_5_BTN = "process_1_5_btn.png";
	public static String PROCESS_1_6_BTN = "process_1_6_btn.png";
	public static String PROCESS_1_7_BTN = "process_1_7_btn.png";
	public static String PROCESS_2_BG = "process_2_bg.png";
	public static String PROCESS_2_1_BTN = "process_2_1_btn.png";
	public static String PROCESS_2_2_BTN = "process_2_2_btn.png";
	public static String PROCESS_2_3_BTN = "process_2_3_btn.png";
	public static String PROCESS_2_4_BTN = "process_2_4_btn.png";
	public static String PROCESS_3_BG = "process_3_bg.png";
	public static String PROCESS_3_1_BTN = "process_3_1_btn.png";
	public static String PROCESS_3_2_BTN = "process_3_2_btn.png";
	public static String PROCESS_3_3_BTN = "process_3_3_btn.png";
	public static String PROCESS_3_4_BTN = "process_3_4_btn.png";
	public static String PROCESS_3_5_BTN = "process_3_5_btn.png";
	public static String PROCESS_4_BG = "process_4_bg.png";
	public static String PROCESS_4_1_BTN = "process_4_1_btn.png";
	public static String PROCESS_4_2_BTN = "process_4_2_btn.png";
	public static String PROCESS_4_3_BTN = "process_4_3_btn.png";
	public static String PROCESS_4_4_BTN = "process_4_4_btn.png";
	public static String PROCESS_5_BG = "process_5_bg.png";
	public static String PROCESS_5_1_BTN = "process_5_1_btn.png";
	public static String PROCESS_5_2_BTN = "process_5_2_btn.png";
	public static String PROCESS_5_3_BTN = "process_5_3_btn.png";
	public static String PROCESS_5_4_BTN = "process_5_4_btn.png";
	public static String PROCESS_7_BG = "process_7_bg.png";
	public static String PROCESS_7_1_BTN = "process_7_1_btn.png";
	public static String PROCESS_7_2_BTN = "process_7_2_btn.png";
	public static String PROCESS_7_3_BTN = "process_7_3_btn.png";
	public static String PROCESS_7_4_BTN = "process_7_4_btn.png";
	
	/**报表图片*/
	/**报表打印按钮背景*/
	public static String BUTTON_PRINT_BG = "btn_print_bg.png";
	public static String BUTTON_PRINT_LEFT_BG = "btn_print_bg_left.png";
	public static String BUTTON_PRINT_RIGHT_BG = "btn_print_bg_right.png";
	/**报表打印、导出按钮icon*/
	public static String BUTTON_PRINT_ICON = "btn_print_icon.png";
	public static String BUTTON_EXPORT_ICON = "btn_export_icon.png";
	/**报表头部的被面板背景图片*/
	public static String PANEL_STATEMENT_TOP_BG_LEFT = "panel_statement_top_bg_left.png";
	public static String PANEL_STATEMENT_TOP_BG = "panel_statement_top_bg.png";
	public static String PANEL_STATEMENT_TOP_BG_RIGHT = "panel_statement_top_bg_right.png";
	/**报表List中节点的背景色-选中,icon,icon选中*/
	public static String LIST_NODE_BTN_BG = "list_node_btn_bg.png";
	public static String LIST_NODE_BTN_ICON = "list_node_btn_icon.png";
	public static String LIST_NODE_BTN_SELECT_ICON = "list_node_btn_select_icon.png";
	public static String LIST_NODE_BTN_IMAGE_RIGHT = "list_node_btn_icon_right.png";
	/**TabbedPane图像名称的常量*/
	public static final String TabbedPane_header_background="tab_header_background.png";
	public static final String TabbedPane_header_unselected_background="tab_header_unselected_background.png";
	public static final String TabbedPane_close="tab_close.png";
	public static final String TabbedPane_close_pressed="tab_close_pressed.png";
	public static final String TabbedPane_header_unselected_background_left="tab_header_unselected_background_left.png";
	public static final String TabbedPane_header_unselected_background_right="tab_header_unselected_background_right.png";
	public static final String TabbedPane_header_selected_background_left="tab_header_selected_background_left.png";
	public static final String TabbedPane_header_selected_background_right="tab_header_selected_background_right.png";
	
	/**TabbedPane头部图片*/
	public static String TAB_BG = "tab_bg.png";
	public static String TAB_BG_SELECT = "tab_bg_select.png";
	
	/** 启动界面*/
	public static String START_BG = "start_bg.png";
	public static String START_LEFT_BG = "start_left_bg.png";
	public static String START_RIGHT_BG = "start_right_bg.png";
	public static String START_LOGO_BG = "start_logo_bg.png";
	/** 登录界面*/
	public static String LOGIN_BG = "login_bg.png";
	public static String LOGIN_BTN_BG = "login_btn_.png";
	public static String LOGIN_BTN_RESET_BG = "login_btn_reset.png";
	public static String LOGIN_BTN_QUIT_BG = "login_btn_quit.png";
	public static String LOGIN_SELECT_BTN_BG = "login_select_btn_.png";
	public static String LOGIN_SELECT_BTN_RESET_BG = "login_select_btn_reset.png";
	public static String LOGIN_SELECT_BTN_QUIT_BG = "login_select_btn_quit.png";
	
	
	/** 标题栏*/
	public static String TITLE_TOP_BG = "tital_top_bg.png";//工具栏上面图片背景
	public static String TITLE_STATUS_BG = "tital_status_bg.png";//工具栏下面图片背景
	public static String TITLE_IMAGE = "logo.png";//Logo
	public static String TOOLBAR_BG= "toolbar_bg.png";//工具栏背景
	public static String TOOLBAR_LEFT_BG = "toolbar_left_bg.png";
	public static String TOOLBAR_RIGHT_BG = "toolbar_right_bg.png";
	public static String SMAIL_TOOLBAR_BG = "smail_toolbar_bg.png";
	
	/**关闭图片*/
	public static String BTN_TITLE_CLOSE = "btn_title_close.png";//鼠标点击
	public static String BTN_TITLE_CLOSE_ENTER = "btn_title_close_enter.png";//鼠标进入
	/** *  最小化图片*/
	public static String BTN_TITLE_MIN = "btn_title_min.png";// 鼠标点击时
	public static String BTN_TITLE_MIN_ENTER = "btn_title_min_enter.png";//鼠标进入时
	/** *  最大化图片*/
	public static String BTN_TITLE_MAX = "btn_title_max.png";// 鼠标点击时
	public static String BTN_TITLE_MAX2 = "btn_title_max2.png";// 鼠标点击时
	public static String BTN_TITLE_MAX_ENTER = "btn_title_max_enter.png";//鼠标进入时
	public static String BTN_TITLE_MAX_ENTER2 = "btn_title_max_enter2.png";//鼠标进入时
	
	public static String TITLE_SELECT = "tital_select.png";
	/** * 订单管理 鼠标进入时图片*/
	public static String TITLE_1 = "tital1.png";
	public static String TITLE_1_ENTER = "tital1_move.png";
	/** * 会员卡管理 图片*/
	public static String TITLE_2 = "tital2.png";
	public static String TITLE_2_ENTER = "tital2_move.png";
	/** * 基础数据管理 图片*/
	public static String TITLE_3 = "tital3.png";
	public static String TITLE_3_ENTER = "tital3_move.png";
	/** * 进货管理 图片*/
	public static String TITLE_4 = "tital4.png";
	public static String TITLE_4_ENTER = "tital4_move.png";
	/** * 库存管理 图片*/
	public static String TITLE_5 = "tital5.png";
	public static String TITLE_5_ENTER = "tital5_move.png";
	/** * 报表管理 图片*/
	public static String TITLE_6 = "tital6.png";
	public static String TITLE_6_ENTER = "tital6_move.png";
	/** * 系统设置 图片*/
	public static String TITLE_7 = "tital7.png";
	public static String TITLE_7_ENTER = "tital7_move.png";
	/** * 网站向导 图片*/
	public static String TITLE_8 = "tital8.png";
	public static String TITLE_8_ENTER = "tital8_move.png";

	
	/** * ICON*/
	public static String ICON_1 = "icon_1.png";//鼠标进入时
	public static String ICON_2 = "icon_2.png";//标题ICON
	public static String ICON_3 = "icon_3.png";//感叹号ICON
	public static String ICON_4 = "icon_4.png";//箭头ICON
	public static String ICON_5 = "icon_5.png";//左箭头ICON
	public static String ICON_6 = "icon_6.png";//右箭头ICON
	public static String ICON_7 = "icon_7.png";
	
	/**查询面板*/
	public static String QUERY_PANEL_BG = "query_panel_bg.png";//背景
	public static String QUERY_PANEL_LEFT_BG = "query_panel_left_bg.png";//左背景
	public static String QUERY_PANEL_RIGHT_BG = "query_panel_right_bg.png";//右背景
	public static String QUERY_TITLE_BG = "query_title1_bg.png";//标题背景
	public static String QUERY_TITLE_LEFT_BG = "query_title1_left_bg.png";//标题背景
	public static String QUERY_TITLE_RIGHT_BG = "query_title1_right_bg.png";//标题背景
	public static String QUERY_TITLE_LINE_BG = "query_panel_line_bg.png";//背景线条
	/**输入框*/
	public static String TEXT_BG = "text_bg.png";
	public static String TEXT_LEFT_BG = "text_left_bg.png";
	public static String TEXT_RIGHT_BG = "text_right_bg.png";
	/**蓝色按钮*/
	public static String BUTTON_BLUE_BG = "btn_blue_bg.png";
	public static String BUTTON_BLUE_LEFT_BG = "btn_blue_left_bg.png";
	public static String BUTTON_BLUE_RIGHT_BG = "btn_blue_right_bg.png";
	public static String BUTTON_BLUE_SELECT_BG = "btn_blue_select_bg.png";
	public static String BUTTON_BLUE_SELECT_LEFT_BG = "btn_blue_select_left_bg.png";
	public static String BUTTON_BLUE_SELECT_RIGHT_BG = "btn_blue_select_right_bg.png";
	/**灰色按钮*/
	public static String BUTTON_GRAY_BG = "btn_gray_bg.png";
	public static String BUTTON_GRAY_LEFT_BG = "btn_gray_left_bg.png";
	public static String BUTTON_GRAY_RIGHT_BG = "btn_gray_right_bg.png";
	/**白色按钮*/
	public static String BUTTON_WHITE_BG = "btn_white_bg.png";
	public static String BUTTON_WHITE_LEFT_BG = "btn_white_left_bg.png";
	public static String BUTTON_WHITE_RIGHT_BG = "btn_white_right_bg.png";
	/**蓝色圆角按钮*/
	public static String BUTTON_ROUND_BLUE_BG = "btn_round_blue_bg.png";
	public static String BUTTON_ROUND_BLUE_LEFT_BG = "btn_round_blue_left_bg.png";
	public static String BUTTON_ROUND_BLUE_RIGHT_BG = "btn_round_blue_right_bg.png";
	public static String BUTTON_ROUND_BLUE_SELECT_BG = "btn_round_blue_select_bg.png";
	public static String BUTTON_ROUND_BLUE_SELECT_LEFT_BG = "btn_round_blue_select_left_bg.png";
	public static String BUTTON_ROUND_BLUE_SELECT_RIGHT_BG = "btn_round_blue_select_right_bg.png";
	/**灰色圆角按钮*/
	public static String BUTTON_ROUND_GRAY_BG = "btn_round_gray_bg.png";
	public static String BUTTON_ROUND_GRAY_LEFT_BG = "btn_round_gray_left_bg.png";
	public static String BUTTON_ROUND_GRAY_RIGHT_BG = "btn_round_gray_right_bg.png";
	public static String BUTTON_ROUND_GRAY_SELECT_BG = "btn_round_gray_select_bg.png";
	public static String BUTTON_ROUND_GRAY_SELECT_LEFT_BG = "btn_round_gray_select_left_bg.png";
	public static String BUTTON_ROUND_GRAY_SELECT_RIGHT_BG = "btn_round_gray_select_right_bg.png";
	/**橙色圆角按钮*/
	public static String BUTTON_ROUND_ORAGER_BG = "btn_round_orager_bg.png";
	public static String BUTTON_ROUND_ORAGER_LEFT_BG = "btn_round_orager_left_bg.png";
	public static String BUTTON_ROUND_ORAGER_RIGHT_BG = "btn_round_orager_right_bg.png";
	public static String BUTTON_ROUND_ORAGER_SELECT_BG = "btn_round_orager_select_bg.png";
	public static String BUTTON_ROUND_ORAGER_SELECT_LEFT_BG = "btn_round_orager_select_left_bg.png";
	public static String BUTTON_ROUND_ORAGER_SELECT_RIGHT_BG = "btn_round_orager_select_right_bg.png";
	/**表格*/
	public static String TABLE_HEADER_BG = "table_header_bg.png";
	
	/**背景 图片*/
	public static String DOWN_BG_1 = "down_bg_1.png";
	public static String DIALOG_TOP_BG_1 = "dialog_top_bg.png";
	public static String DIALOG_TOP_BG_2 = "dialog_top_1_bg.png";
	public static String DIALOG_DOWN_BG_1 = "dialog_down_bg.png";
	
	/**其他 图片*/
	public static String test_statusbar_message_light_green = "statusbar_message_light_green.png";
	public static String test_statusbar_message_light_orange = "statusbar_message_light_orange.png";
	public static String test_statusbar_message_light_red= "statusbar_message_light_red.png";
	public static String test_separator_background= "separator_background.png";
	public static String test_shrink_handler_left= "shrink_handler_left.png";
	public static String test_shrink_handler_right= "shrink_handler_right.png";
	public static String test_header_background= "header_background.png";
	public static String test_header_background_left= "header_background_left.png";
	public static String test_header_background_right= "header_background_right.png";
	public static String test_resize_handler= "resize_handler.png";
	public static String test_icon= "test_icon.png";
	public static String test_icon2= "test_icon2.png";
	
	public static String test_bg1= "test_bg1.png";
	public static String test_bg2= "test_bg2.png";
	public static String test_bg3= "test_bg3.png";
	public static String test_bg4= "test_bg4.png";
	
	/** * 餐桌按钮图片*/
	public static String BTN_TABLE0 = "btn_table0.png";
	public static String BTN_TABLE1 = "btn_table1.png";
	public static String BTN_TABLE2 = "btn_table2.png";
	public static String BTN_TABLE3 = "btn_table3.png";
	
	/** * 菜品按钮图片*/
	public static String BTN_DISH = "btn_dish.png";
	public static String BTN_DISH_CLICK = "btn_dish_click.png";
	public static String BTN_DISH_DISABLED = "btn_dish_disabled.png";
	
	/** * 调味按钮图片*/
	public static String BTN_COOKING_CLICK = "btn_cooking_click.png";
	public static String BTN_COOKING = "btn_cooking.png";
	
	/** * 菜品类型按钮图片*/
	public static String BTN_DISH_TYPE_BG = "btn_dish_type_bg.png";
	public static String BTN_DISH_TYPE_LEFT = "btn_dish_type_left.png";
	public static String BTN_DISH_TYPE_RIGHT = "btn_dish_type_right.png";
	public static String BTN_DISH_TYPE = "btn_dish_type.png";
	public static String BTN_TYPE_NEXT_CLICK = "btn_type_next_click.png";
	public static String BTN_TYPE_NEXT = "btn_type_next.png";
	public static String BTN_TYPE_PREV_CLICK = "btn_type_prev_click.png";
	public static String BTN_TYPE_PREV = "btn_type_prev.png";
	
	/** * table按钮图片: + - */
	public static String BTN_TABLE_ADD = "btn_table_add.png";
	public static String BTN_TABLE_SUB = "btn_table_sub.png";
	public static String BTN_TABLE_SUB_GRAY = "btn_table_sub_gray.png";
	
	/** * 订单处理按钮背景图片 ：结账，挂单，取单………… */
	public static String BTN_ORDER_BG_LEFT = "btn_order_bg_left.png";
	public static String BTN_ORDER_BG_RIGHT = "btn_order_bg_right.png";
	public static String BTN_ORDER_BG = "btn_order_bg.png";
	public static String BTN_ORDER_BG2 = "btn_order_bg2.png";
	public static String BTN_ORDER_CLICK_BG_LEFT = "btn_order_click_bg_left.png";
	public static String BTN_ORDER_CLICK_BG_RIGHT = "btn_order_click_bg_right.png";
	public static String BTN_ORDER_CLICK_BG = "btn_order_click_bg.png";
	/** * 结账，挂单，取单…………按钮图片 */
	public static String BTN_ORDER_BILL = "btn_order_bill.png";
	public static String BTN_ORDER_CANCLE = "btn_order_cancle.png";
	public static String BTN_ORDER_DISCOUNT = "btn_order_discount.png";
	public static String BTN_ORDER_HUNG = "btn_order_hung.png";
	public static String BTN_ORDER_MONEY = "btn_order_money.png";
	public static String BTN_ORDER_OBTAIN = "btn_order_obtain.png";
	
	/** * 弹出框的标题栏 背景图片 */
	public static String DIALOG_TITLE_BG = "dialog_title_bg.png";
	public static String DIALOG_TITLE_BG_LEFT = "dialog_title_bg_left.png";
	public static String DIALOG_TITLE_BG_RIGHT = "dialog_title_bg_right.png";
	/** * 弹出框的标题 图片 */
	public static String LAB_TITLE_BG = "lab_title_bg.png";
	public static String LAB_TITLE_BG_LEFT = "lab_title_bg_left.png";
	public static String LAB_TITLE_BG_RIGHT = "lab_title_bg_right.png";
	public static String LAB_TITLE_ICON = "lab_title_icon.png";
	
	/** * 菜品类型   面板  背景图片*/
	public static String PANEL_DISH_TYPE_BG = "panel_dish_type_bg.png";
	
	/** * 订单处理背景图片 ：结账，挂单，取单………… 在的面板*/
	public static String JP_ORDER_DISPOSE_BG_LEFT= "jp_order_dispose_bg_left.png";
	public static String JP_ORDER_DISPOSE_BG_RIGHT= "jp_order_dispose_bg_right.png";
	public static String JP_ORDER_DISPOSE_BG= "jp_order_dispose_bg.png";
	
	/** * 订单中table中的标签中的图片*/
	public static String LABEL_ORDER_TABLE = "label_order_table.png";
	public static String TABLE_ORDER_LINE = "table_order_line.png";//虚线
	
	
	/**报表临时图片 */
	public static String STATEMENT_BG_IMAGE = "statement.png";//虚线
	
	// 使用Hashtable保存使用的图片资源
	private static Hashtable<String, ImageIcon> htImage = new Hashtable<String, ImageIcon>();

	// 加载图片.首先从htImage中获得图片对象，
	// 如果没有，则加载新的图片并放入到htImage
	public static ImageIcon loadImage(String imageName) {
		if (imageName == null)
			return null;
		ImageIcon image = (ImageIcon) htImage.get(imageName.toUpperCase());
		if (image == null) {
			image = getOpenSwingImage(imageName,null);
//			System.out.println(image);
			htImage.put(imageName.toUpperCase(), image);
		}
		return image;
	}
    /**
     * 取得图象资源
     * @param name String 图像名
     * @param defaultIcon ImageIcon 未取到时赋予的默认图像
     * @return ImageIcon
     */
	 private static ImageIcon getOpenSwingImage(String name,ImageIcon defaultIcon) {
        ImageIcon icon = null;
        try {
            java.net.URL url = ClassLoader.getSystemResource(REAL_PATH + name);
            icon = new ImageIcon(url);
        }
        catch (Exception ex) {
        }
        if (icon == null|| icon.getImageLoadStatus() != MediaTracker.COMPLETE|| icon.getIconHeight() <= 0) {
            icon = defaultIcon;
        }
        return icon;
    }
}